import { doCustomTimes } from "@/libs/utils"
import Mock from 'mockjs';
const Random = Mock.Random;

export const equipmentInfo = (req) => {
    let historyList = [];
    doCustomTimes(10, () => {
        historyList.push(Mock.mock({
            id: Random.increment(3),
            packageState: "",
            description: "",
            leader: "@cname",
            finishTime: "@date"
        }));
    })
    let data = Mock.mock({
        KKScode: "erer",
        "department|1": ["田湾静机一部", "田湾静机二部", "田湾仪控部", "田湾电气一部"],
        unitType: "7ER-YU",
        name: "稳压器",
        historyList: historyList
    });
    return {
        data: data,
        success: "true",
        msg: null
    }
}

export const equipmentSubmit = (req) => {
    return {
        data: "",
        success: "true",
        msg: "保存成功!"
    }
}